<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$lang.home}{if $ur_here} - {$ur_here} {/if}</title>
<meta name="Copyright" content="Douco Design." />
<link href="templates/public.css" rel="stylesheet" type="text/css">
{include file="javascript.htm"}
</head>
<body>
<div id="dcWrap">
 {include file="header.htm"}
 <div id="dcLeft">{include file="menu.htm"}</div>
 <div id="dcMain">
   {include file="ur_here.htm"}
   <div class="mainBox" style="{$workspace.height}">
    <!-- {if $rec eq 'default'} 分类列表 -->
    <h3><a href="{$action_link.href}" class="actionBtn add">{$action_link.text}</a>{$ur_here}</h3>
    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     <tr>
        <th width="120" align="left">{$lang.article_category_name}</th>
      <th align="left">{$lang.unique}</th>
        <th align="left">{$lang.description}</th>
       <th width="60" align="center">{$lang.sort}</th>
        <th width="80" align="center">{$lang.handler}</th>
      </tr>
      <!-- {foreach from=$article_category item=cate} -->
      <tr>
        <td align="left">{$cate.mark} <a href="article.php?cat_id={$cate.cat_id}">{$cate.cat_name}</a></td>
        <td>{$cate.unique_id}</td>
        <td>{$cate.description}</td>
        <td align="center">{$cate.sort}</td>
        <td align="center"><a href="article_category.php?rec=edit&cat_id={$cate.cat_id}">{$lang.edit}</a> | <a href="article_category.php?rec=del&cat_id={$cate.cat_id}">{$lang.del}</a></td>
      </tr>
      <!-- {/foreach} -->
    </table>
    <!-- {/if} -->
    <!-- {if $rec eq 'add' || $rec eq 'edit'} 分类添加或编辑 -->
    <h3><a href="{$action_link.href}" class="actionBtn">{$action_link.text}</a>{$ur_here}</h3>
    <form action="article_category.php?rec={$form_action}" method="post">
     <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
      <tr>
       <td width="80" align="right">{$lang.article_category_name}</td>
       <td>
        <input type="text" name="cat_name" value="{$cat_info.cat_name}" size="40" class="inpMain" />
       </td>
      </tr>
      <tr>
       <td align="right">{$lang.unique}</td>
       <td>
        <input type="text" name="unique_id" value="{$cat_info.unique_id}" size="40" class="inpMain" />
       </td>
      </tr>
      <tr>
       <td align="right">{$lang.parent}</td>
       <td>
        <select name="parent_id">
         <option value="0">{$lang.empty}</option>
         <!-- {foreach from=$article_category item=cate} -->
         <!-- {if $cate.cat_id eq $cat_info.parent_id} -->
         <option value="{$cate.cat_id}" selected="selected">{$cate.mark} {$cate.cat_name}</option>
         <!-- {else} -->
         <option value="{$cate.cat_id}">{$cate.mark} {$cate.cat_name}</option>
         <!-- {/if} -->
         <!-- {/foreach} -->
        </select>
       </td>
      </tr>
      <tr>
       <td align="right">{$lang.keywords}</td>
       <td>
        <input type="text" name="keywords" value="{$cat_info.keywords}" size="40" class="inpMain" />
       </td>
      </tr>
      <tr>
       <td align="right">{$lang.description}</td>
       <td>
        <textarea name="description" cols="60" rows="4" class="textArea">{$cat_info.description}</textarea>
       </td>
      </tr>
      <tr>
       <td align="right">{$lang.sort}</td>
       <td>
        <input type="text" name="sort" value="{if $cat_info.sort}{$cat_info.sort}{else}50{/if}" size="5" class="inpMain" />
       </td>
      </tr>
      <tr>
       <td></td>
       <td>
        <input type="hidden" name="token" value="{$token}" />
        <input type="hidden" name="cat_id" value="{$cat_info.cat_id}" />
        <input name="submit" class="btn" type="submit" value="{$lang.btn_submit}" />
       </td>
      </tr>
     </table>
    </form>
    <!-- {/if} -->
   </div>
 </div>
 {include file="footer.htm"}
 </div>
</body>
</html>